package com.bonc.modules.rpt.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bonc.datasource.annotation.DataSource;
import com.bonc.factory.PageFactory;
import com.bonc.modules.rpt.dao.ComplainSatisfationRegionDao;
import com.bonc.modules.rpt.entity.ComplainSatisfactionRegionEntity;
import com.bonc.modules.rpt.param.FixParam;
import com.bonc.modules.rpt.service.FixService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author jinlong
 * @date 2021/7/30
 */
@Service("cmpSatisRegionNormal")
@DataSource("data")
public class CmpSatisRegionNormalServiceImpl implements FixService {

    @Autowired
    private ComplainSatisfationRegionDao complainSatisfationRegionDao;

    @Override
    public String getMaxDate() {
        return complainSatisfationRegionDao.getMaxMonth();
    }

    @Override
    public Page<ComplainSatisfactionRegionEntity> queryPage(FixParam fixParam) {
        return complainSatisfationRegionDao.page(PageFactory.defaultPage(), fixParam);
    }

    @Override
    public List<ComplainSatisfactionRegionEntity> queryData(FixParam fixParam) {
        return complainSatisfationRegionDao.list(fixParam);
    }

}
